﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Configuration;
using System.Web.Configuration;


public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string path = this.Request.ApplicationPath;
        
Configuration config
    = WebConfigurationManager.OpenWebConfiguration( null );
ProcessModelSection proecssModeSection
    = config.GetSection("system.web/processModel")
    as ProcessModelSection;

this.Label1.Text = string.Format("MaxWorkerThreads: {0}", proecssModeSection.MaxWorkerThreads);
this.Label2.Text = string.Format("MinWorkerThreads: {0}", proecssModeSection.MinWorkerThreads);
this.Label3.Text = string.Format("MaxIOThreads: {0}", proecssModeSection.MaxIOThreads);
this.Label4.Text = string.Format("MinIOThreads: {0}", proecssModeSection.MinIOThreads);

HttpRuntimeSection httpRuntimeSection
    = config.GetSection("system.web/httpRuntime")
    as HttpRuntimeSection;
this.Label5.Text = string.Format("MinFreeThreads: {0}", httpRuntimeSection.MinFreeThreads);
this.Label6.Text = string.Format("MinLocalRequestFreeThreads: {0}", httpRuntimeSection.MinLocalRequestFreeThreads);
this.Label7.Text = string.Format("AppRequestQueueLimit: {0}", httpRuntimeSection.AppRequestQueueLimit);

    }
}
